package com.aqie.easy.math;

/**
 * 598 范围求和
 */
public class MaxCount {
    public int maxCount(int m, int n, int[][] ops) {
        int R = ops.length;
        if (ops.length==0){
            return m*n;
        }
        int l = Integer.MAX_VALUE, r = Integer.MAX_VALUE;

        for (int i = 0; i < R; i++){
           if (ops[i][0] < l) l = ops[i][0];
           if (ops[i][1] < r) r = ops[i][1];
        }
        return l * r;
    }
}
